/*
 * @Author: hrg
 * @Date: 2024-01-23 09:38:25
 * @LastEditTime: 2024-01-23 09:45:55
 * @FilePath: \study_go\study06_gin\gin_demo02\main.go
 * @Description:基本路由
 */
package main

import (
	"net/http"

	"github.com/gin-gonic/gin"
)

func main() {

	r := gin.Default()

	r.GET("/", func(ctx *gin.Context) {
		ctx.String(http.StatusOK, "hello,world!")
	})

	r.POST("/xxxpost", hrgTesting)

	r.PUT("/vvvput")

	r.Run(":8000")

}
func hrgTesting(c *gin.Context) {

	c.String(200, "这是post请求")
}
